Skip to content

fix(docs): make Linux tar log-collection commands actually work (#16)#36

Merged
dannyneira merged 1 commit intomainfrom
oz/fix-16-linux-tar-glob
May 8, 2026
Merged

fix(docs): make Linux tar log-collection commands actually work (#16)#36
dannyneira merged 1 commit intomainfrom
oz/fix-16-linux-tar-glob

Conversation

@hongyi-chen
Copy link
Copy Markdown
Collaborator

@hongyi-chen hongyi-chen commented May 7, 2026

Closes #16.

Problem

The Linux tar commands in Gathering Warp Logs at src/content/docs/support-and-community/troubleshooting-and-support/sending-us-feedback.mdx (L161, L169) fail with tar: warp.log*: Cannot stat: No such file or directory. On Linux with bash + default nullglob=off, an unmatched warp.log* glob is left as a literal argument; tar then looks for a literal file named warp.log* inside the -C directory and fails. Reported in #16.

The macOS (zip -j) and Windows (Compress-Archive) commands aren't affected — only the Linux tab.

Fix

cd into the log directory first, so the shell expands the glob in the right pwd. Wrap the cd + tar in subshell parens so the user's pwd is preserved after the command finishes:

(cd ~/.local/state/warp-terminal && tar -czf ~/warp-logs.tar.gz warp.log*)
(cd ~/.local/state/warp-terminal-preview && tar -czf ~/warp_preview-logs.tar.gz warp_preview.log*)

While I was in the file, also normalized the indentation in the Linux :::caution RUST_LOG=… block to the 4-space indent already used by the macOS and Windows tabs.

Verification

Reproduced the bug + verified the fix with GNU tar 1.35 + bash on a sandbox dir:

  • OLD command reproduces the reporter's failure: gtar: warp.log*: Cannot stat: No such file or directory (exit=2).
  • NEW command exits 0 and archives warp.log, warp.log.1, warp.log.2.
  • Caller's pwd is preserved: before == after after the subshell exits.

Note: an earlier draft of this fix used GNU tar's --wildcards flag. That flag only enables glob matching during extraction/listing; in creation mode tar still treats arguments as literal paths, so it didn't actually fix the bug. The cd-then-tar approach (which the issue reporter suggested) is correct and verified.

npm run build succeeds (315 pages).

Conversation: https://staging.warp.dev/conversation/fddc3534-3d55-4783-a388-a1eb70e432f9

Plans:

This PR was generated with Oz.

@cla-bot cla-bot Bot added the cla-signed label May 7, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment May 7, 2026 10:28pm

Request Review

Closes #16.

The Linux tar commands in 'Gathering Warp Logs' fail with 'tar: warp.log*:
Cannot stat: No such file or directory' on Linux: bash leaves the
unmatched literal 'warp.log*' as the file argument to tar, and tar then
looks for a literal file named 'warp.log*' inside the -C directory.

Switch to 'cd into the directory first, then tar' so the shell expands
the glob in the right pwd. Wrap the cd+tar in subshell parens so the
user's pwd is preserved after the command finishes (the cd only affects
the subshell).

Verified with GNU tar 1.35 + bash:
  - OLD command reproduces the reporter's failure (exit=2,
    'Cannot stat: No such file or directory').
  - NEW command exits 0 and archives warp.log, warp.log.1, warp.log.2.
  - Caller's pwd is unchanged after the subshell exits.

(Earlier draft of this fix used GNU tar's --wildcards flag, but
--wildcards only enables glob matching during EXTRACTION/listing; in
creation mode tar still treats arguments as literal paths. Reverted
to the cd-then-tar approach the issue reporter suggested.)

Also normalize the indentation in the Linux :::caution RUST_LOG block
to the 4-space indent already used by the macOS and Windows tabs.

Co-Authored-By: Oz <oz-agent@warp.dev>
Copy link
Copy Markdown
Member

@dannyneira dannyneira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and confirmed working in bash, zsh, and pwsh on Linux

@dannyneira dannyneira merged commit 2e3dda0 into main May 8, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

L167 of sending-us-feedback.mdx incorrectly advises how to generate an archive of Warp Preview logs for Linux-based OSes.

2 participants